<html>
<head>
<style>
.bg{
    background-image: url('rating.png');
    background-repeat: no-repeat;
    padding: 0px;
    margin: 0px;
	width:20px;
	height:20px;
	background-position: -20px 0px;
}
</style>

<script type="text/javascript">
    function getPosX(index, status){
	debugger
       	var isRtl = false,bgX;
		bgX = 0 - status * 20 - index * 10;
		if(isRtl)
			bgX += Z.itemWidth;
		document.getElementById("tmp").style.backgroundPositionX = bgX +"px";
		//return bgX;
	}

</script>
</head>
<body>
<div id="tmp" class="bg" style="width:10px;height:20px"></div>

<input type="button" value="test" onclick="getPosX(0,2)" />
</body>
</html>

